<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Skornyakov Anatoliy
 * Date: 15.06.13
 * Time: 16:02
 * 
 */

class Zftest_Form_Metro extends Zftest_Form
{
    public function init()
    {
        parent::init();
        $this->setAction('/')
            ->setMethod(Zend_Form::METHOD_POST)
            ->addElements(array(
                new Zend_Form_Element_Select('city', array(
                    'label'        => 'Город',
                    'order'        => 1,
                    'decorators'   => $this->getStackDecorators('table', 'elements'),
                    'required'     => true,
                    'data-dojo-type' => 'dijit.form.Select',
                    'data-dojo-id'   => 'selectCity'
                )),
                new Zend_Form_Element_Select('metro', array(
                    'label'      => 'Метро',
                    'order'      => 2,
                    'decorators' => $this->getStackDecorators('table', 'elements'),
                    'data-dojo-id'   => 'selectMetro',
                    'data-dojo-type' => 'dijit.form.Select'
                )),
            ));

        $this->setDecorators($this->getStackDecorators('table', 'form'));
    }
}